<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 2020/4/7
  Time: 20:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
        #allmap{height:500px;width:100%;}
        #r-result{width:100%; font-size:14px;}
    </style>
    <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=vGPPk9ZhhAvzSfGfqEt4zzYFdXRCVoCQ"></script>

    <title>添加地址的页面</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/address_add.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/head.css">
    <script src="${pageContext.request.contextPath}/js/jQuery/jquery-3.4.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/dist/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
</head>
    <body>
    <!--========================头部===================================================-->
    <div class="top">
        <input type="hidden" value="${product.productId}" class="productid">
        <input type="hidden" value="${loginCustomer.customerId}" class="customerid">
        <div class="top-log">
            <div class="logo">
                <a href="/fresh/index.jsp"><img src="${pageContext.request.contextPath}/images/xianyu.jpg" width="90" height="40"></a>
            </div>
        </div>
        <div class="top-dingwei">
            <div class="top-dingwei-main">
                <ul>
                    <li class="top-dingwei-img"><img src="${pageContext.request.contextPath}/images/dingwei.png"></li>
                    <li class="top-dingwei-city"><a href="#">深圳<p class="top-dingwei-jiantou"></p></a></li>
                </ul>
            </div>
        </div>
        <!--============================搜索=====================================-->
        <div class="search">
            <div class="layui-form">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入查询关键字" autocomplete="off" class="layui-input input-text">
                <button class="submit-button"><i class="submitButton"></i> </button>
            </div>
        </div>
        <!--=======================购物车==========================-->
        <div class="cart">
            <dl>
                <dt class="shopping-btn">
                    <a href="/fresh/cart/cart.jsp">
                        <b class="totlePrice">￥2020.00</b>
                    </a>
                </dt>
            </dl>
        </div>

        <!--=======================我的====================================-->
        <div class="top-menu">
            <div class="login">
                <c:choose>
                <c:when test="${empty loginCustomer}">
                    <p>
                        <a href="/fresh/customer/login.jsp">登录/</a>
                        <a href="/fresh/customer/regist.jsp">注册</a>
                    </p>
                </c:when>

                <c:otherwise>
                    <p>
                        <a href="">${loginCustomer.customerTelno}/</a>
                        <a href="/fresh/customer/login.jsp">退出</a>
                    </p>
                </c:otherwise>
                </c:choose>

            </div>
            <div class="user">
                <ul>
                    <li class=" tle">
                        <a class="geren" href=""><img src="${pageContext.request.contextPath}/images/geren-logo.png"></a>
                        <a href="/fresh/customer/center.jsp">我的咸鱼</a>
                    </li>
                    <%--<li class="e1">--%>
                        <%--<a class="order" href=""><img src="${pageContext.request.contextPath}/images/order-logo.png"></a>--%>
                        <%--<a href="/fresh/customer/center.jsp">我的订单</a>--%>
                    <%--</li>--%>
                    <%--<li class="e2">--%>
                        <%--<a class="coupon" href=""><img src="${pageContext.request.contextPath}/images/coupon.png"></a>--%>
                        <%--<a href="/fresh/product/attention.jsp">我的关注</a>--%>
                    <%--</li>--%>
                    <%--<li class="last">--%>
                        <%--<a class="exit" href=""><img src="${pageContext.request.contextPath}/images/exit.png"></a>--%>
                        <%--<a href="/fresh/customer/login.jsp">退出账户</a>--%>
                    <%--</li>--%>
                </ul>
            </div>
        </div>
    </div>

    <!--============caidan ============================-->
    <div class="main">
        <div class="sub">
            <div class="menu">
                <dl class="fore0">
                    <dt class="order_center">个人中心</dt>
                    <dd class="order_myorder">
                        <a href="/fresh/customer/center.jsp">我的中心</a><br>
                        <a href="/fresh/address/detail.jsp">我的地址</a>
                    </dd>
                </dl>



                <dl class="fore1">
                    <dt class="order_center">订单中心</dt>
                    <dd class="order_myorder">
                        <a href="/fresh/order/order.jsp">我的订单</a>
                        <!--javascript:void(0)-->
                    </dd>
                </dl>
                <dl class="fore2">
                    <dt class="wallet_center">个人信息</dt>
                    <dd class="wallet_yh">
                        <a href="/fresh/customer/ocr.jsp">身份识别</a>
                    </dd>
                </dl>
                <dl class="fore3">
                    <dt class="gz">我的关注</dt>
                    <dd class="gz_product">
                        <a href="/fresh/product/attention.jsp">关注的商品</a>
                    </dd>
                </dl>
                <dl class="fore4">
                    <dt class="hd">我的购物车</dt>
                    <dd class="hd_yy">
                        <a href="/fresh/cart/cart.jsp">购物车</a>
                    </dd>
                </dl>

            </div>
        </div>


        <!--===========地址管理==================-->
        <div class="m-address">
            <div class="mt">
                <h3>我的地址</h3>
            </div>





            <div class="address-add">
                    <form class="add-mess">
                    地址名称: <input type="text" name="addressName" class="address_name"><br>
                    收件人: &nbsp;&nbsp; <input type="text" name="addressCust" class="address_cust"><br>
                    省份: <select id="s_province" name="addressProvince"></select>
                    市区: <select id="s_city" name="addressCity"></select>
                    城镇: <select id="s_county" name="addressArea"></select><br>
                    详细信息: <input type="text" name="addressDetails" class="address_desc"><br>
                    联系方式: <input type="text" name="addressPhone" class="address_phone"><br>
                    <input type="button" value="提交" class="addbtn-add"><br>
                    <script class="resources library" src="${pageContext.request.contextPath}/js/address/area.js" type="text/javascript"></script>
                    <script type="text/javascript">_init_area();</script>
                    </form>
            </div>

            <!--地图-->
            <div class="a-map">

                <div id="r-result">
                    城市名: <input id="cityName" type="text" style="width:100px; margin-right:10px;" />
                    <input type="button" value="查询" onclick="theLocation()" />
                </div>
                <div id="allmap"></div>


            </div>


        </div>




    </div>



    <script src="${pageContext.request.contextPath}/js/head.js"></script>
    <script src="${pageContext.request.contextPath}/js/address/add.js"></script>
    <script type="text/javascript">
        // 百度地图API功能
        var map = new BMap.Map("allmap");
        var point = new BMap.Point(116.331398,39.897445);
        map.centerAndZoom(point,11);

        function theLocation(){
            var city = document.getElementById("cityName").value;
            if(city != ""){
                map.centerAndZoom(city,11);      // 用城市名设置地图中心点
            }
        }
    </script>

    </body>

</html>
